package com.molyfun.parents.dao.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:11/23/16.
 *
 * 拆分后的下载任务，本地化存储。
 * 如果已经下载结束，删除数据。{@link CourseDownloadTask} 切换标志state为1
 */
@Entity
public class SingleDownloadTask {

    @Id
    private Long id;
    //下载文件url的散列值
    private String taskId;
    //所属课程的download课程ID
    private String downloadKeyId;
    //下载文件url
    private String url;
    //0未下载 1未完成 2完成 3失败
    private int state = 0;
    //下载文件的路径，根据taskId生成
    private String path;
    //游戏id，用于游戏更新，只有游戏有该字段
    private String gameId;
    public String getGameId() {
        return this.gameId;
    }
    public void setGameId(String gameId) {
        this.gameId = gameId;
    }
    public String getPath() {
        return this.path;
    }
    public void setPath(String path) {
        this.path = path;
    }
    public int getState() {
        return this.state;
    }
    public void setState(int state) {
        this.state = state;
    }
    public String getUrl() {
        return this.url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    public String getDownloadKeyId() {
        return this.downloadKeyId;
    }
    public void setDownloadKeyId(String downloadKeyId) {
        this.downloadKeyId = downloadKeyId;
    }
    public String getTaskId() {
        return this.taskId;
    }
    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    @Generated(hash = 46415696)
    public SingleDownloadTask(Long id, String taskId, String downloadKeyId,
            String url, int state, String path, String gameId) {
        this.id = id;
        this.taskId = taskId;
        this.downloadKeyId = downloadKeyId;
        this.url = url;
        this.state = state;
        this.path = path;
        this.gameId = gameId;
    }
    @Generated(hash = 254859284)
    public SingleDownloadTask() {
    }



}
